home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1996
/
MacHack 1996.toast
/
Presentations
/
Presentations ’91
/
DAL Files
/
DALtool 4⁄19 (System 6.x)
/
DalDemo.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-20
|
1KB
|
59 lines
#include <QuickDraw.h>
#include <MacTypes.h>
#include <WindowMgr.h>
#include <TextEdit.h>
#include <ControlMgr.h>
#include <EventMgr.h>
#include "DalDemo.h"
/* Global vars */
Boolean gDone, gWNEImplemented;
EventRecord gTheEvent;
MenuHandle gAppleMenu, gFileMenu, gEditMenu;
CharsHandle gInText;
Rect gDragRect;
Rect gInRect = {22, 43, 160, 400},
gInScrollBarRect = {22,404,160,420},
gOutRect = {165, 43, 340, 400},
gOutScrollBarRect = {165,404, 340, 420};
int gNewWindowLeft = WINDOW_HOME_LEFT, gNewWindowTop = WINDOW_HOME_TOP;
int gLinesInFolder;
char gNodename[80], gUsername[80], gPassword[80];
char dirty;
/*** main ***/
main()
{
ToolBoxInit();
MenuBarInit();
SetUpDragRect();
MaxApplZone();
GlobalVarInit();
MainLoop();
}
/*** MainLoop ***/
MainLoop()
{
Boolean gotOne;
while (!gDone)
{
if (gWNEImplemented)
gotOne = WaitNextEvent(everyEvent, &gTheEvent, MIN_SLEEP, NIL_MOUSE_REGION);
else
{
SystemTask();
gotOne = GetNextEvent(everyEvent, &gTheEvent);
}
if (gotOne)
HandleEvent();
else
HandleIdle();
}
}